#pragma once
#include <lcir/IR/Lambda.h>
#include <lcir/Pass/Pass.h>

#include <memory>
#include <vector>
namespace lcir {
class Pipeline {
  Lambda* module{nullptr};
  std::vector<std::unique_ptr<Pass>> passes;

 public:
  Pipeline(Lambda* module) : module(module) {}

  void run() {
    for (auto& pass : passes) {
      pass->setLambda(module);
      pass->run();
    }
  }
};
}  // namespace lcir